<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>

<script src="${ctx}/includes/jquery.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="${ctx}/style/form_table.css">
<s:form id="query_msgTips_list_form" name="query_msgTips_list_form" method="post" action="msgTips_search.do">
<div  class="con_wrap_padding">
	<table width="100%" class="form-table" >
		<tr>
			<td align="center">任务</td>
			<td align="center" width="45%">消息时间</td>
		</tr>
		<c:forEach items="${page.result}" var="item" varStatus="status">
		<tr>
			<td align="left"><a href="javascript:;" onclick="dkxx('${item.url}','${item.id}')" class="sl">${item.content}</a></td>
			<td align="center"><c:out value='${item.xxsjString}'/>&nbsp;</td>
		</tr>
		</c:forEach>
	</table>
 	</div>
</s:form>
<script>
function dkxx(url,msgtipsid){
	/*
	parent.$.dialog({ 
	    id: 'xxnr', 
	    title:'信息详情',
	    content: 'url:${ctx}/'+url,
	    width:650, 
  		height:500,
  		min:false
	});
	*/
	
	$.getJSON('${ctx}/msgTips_update.do?id='+msgtipsid+'&zt=1&tempdate='+new Date(), function(result){
    	
    });
    parent.window.location.href = "${ctx}/"+url;
    //parent.msg.window.location.reload();
}
var limitLength = 15;//限制多少个字数
limitLen();
function limitLen(){
	$(".sl").each(function(i, n) {
		var s = n.innerHTML;
		n.title = s;
		if(s.length>limitLength){
			n.innerHTML = s.substring(0,limitLength)+"...";
		}
		else if(s.length < limitLength){
			for(var c = s.length;c<limitLength+3;c++){//+3是因为后面三个...
				s += " ";	
			}
			$(this).innerHTML = s;
		}
	});
}
</script>